import request from '@/utils/request'

// 获取企业外部编码配置信息
export function getExternalCodeConfig(enterpriseId) {
  return request({
    url: '/user/ExternalCodeConfig/getByEnterpriseId',
    method: 'get',
    params: {
      enterpriseId: enterpriseId
    }
  })
}

// 保存
export function saveExternalCodeConfig(data) {
  return request({
    url: '/user/ExternalCodeConfig/save',
    method: 'post',
    data: data
  })
}

// 重新生成
export function batchUpdateExternalCode(enterpriseId) {
  return request({
    url: '/user/ExternalCodeConfig/batchUpdateExternalCode',
    method: 'get',
    params: { enterpriseId: enterpriseId }
  })
}
